/*
 *  Constants.h
 *  Sip
 *
 *  Created by Erphan on 12/21/10.
 *  Copyright 2010 Smonte. All rights reserved.
 *
 */

#ifndef __SIP_CONSTANTS_H__
#define __SIP_CONSTANTS_H__

/* Functions */
#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define APP_NAME			@"J.Mobi"

#define APP_NAVIGATION_COLOR    0x171f28

/* These are for Sip manager Only */
#define SIP_REGCALLBACK		@"SipRegistrationCallback"
#define SIP_INCOMING_CALL	@"SipIncomingCall"
#define SIP_CALLSTATE		@"SipCallState"

// FOR UI Only
#define UICALLSTATE_CALLBACK	@"UICallStateCallBack"
#define UIREGISTRATION_CALLBACK	@"UIRegistrationStateCallback"

// Dictionary Key Name for NSNotification
#define DIC_ACCOUNTINFO		@"AccountInfo"
#define DIC_CALLINFO		@"CallInfo"


// PJ SIP Constants
#define THIS_FILE			"PJSIP"

#define NO_MULTICALL		1

/* Ringtones                US         UK  */
#define RINGBACK_FREQ1      440     /* 400 */
#define RINGBACK_FREQ2      480     /* 450 */
#define RINGBACK_ON         2000    /* 400 */
#define RINGBACK_OFF        4000    /* 200 */
#define RINGBACK_CNT        1       /* 2   */
#define RINGBACK_INTERVAL   4000    /* 2000 */

#define RING_FREQ1			800
#define RING_FREQ2			640
#define RING_ON             200
#define RING_OFF            100
#define RING_CNT            3
#define RING_INTERVAL		3000


#define HTTP_SERVER @"https://81.20.37.253"

#define URL_SIPSERVER		@"ast.televersity.me.uk:6000"
#define SIP_PORT			6000
#define SIP_LOGGING_LEVEL	0
#define URL_VERIFYCODE		HTTP_SERVER @"/PHPScripts/VNData.php"
#define URL_REGISTERPHONE   HTTP_SERVER @"/PHPScripts/VNData.php"
#define URL_DEVICETOKEN     @"https://ast.televersity.me.uk/cgi-bin/apns.php"
#define URL_LOCATION		@"http://api.hostip.info/country.php"
#define URL_SENDTEXT		HTTP_SERVER @"/voxper/sms.php"
#define URL_GETTEXTMESSAGE	HTTP_SERVER @"/voxper/sms.php"
#define URL_CONTACTSERVICE	HTTP_SERVER @"/voxper/get-data.php"
#define URL_SMSDELSERVICE	HTTP_SERVER @"/voxper/sms.php"

#define URL_MISSEDCALLSERVICE	HTTP_SERVER @"/voxper/user-calls.php"

#define APP_VERSION			@"1.0 (alpha)"
#define APP_URL				@"www.voxper.com"

#define APP_FACEBOOK_URL	@"http://www.facebook.com/share.php?u=http://www.voxper.com"
#define APP_TWITTER_URL		@"http://twitter.com/share?url=http://www.voxper.com&via=voxper&text=I am using Voxper iPhone app to make free phone calls"
#define APP_PRIVACY_URL		@"http://www.voxper.com/privacy.php"
#define APP_CONNECTION_ERROR @"No internet connection"

#endif /* __SIP_CONSTANTS_H__ */

/* RECENT CALLS TABLE
 CREATE TABLE "recentcalls" (
 "id" INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL  UNIQUE , 
 "phonenumber" VARCHAR NOT NULL , 
 "externalid" VARCHAR, 
 "calltime" DATETIME NOT NULL  DEFAULT CURRENT_TIMESTAMP, 
 "calltype" INTEGER NOT NULL  DEFAULT 1)
 */
